<?php

namespace PAT\UserBundle\Form\Type;

use Symfony\Component\Form\FormBuilderInterface;

use Symfony\Component\Form\FormBuilder;
use Symfony\Component\Form\AbstractType;

class AddressType extends AbstractType {
	public function buildForm(FormBuilderInterface $builder, array $options) {
		$builder->add("street","text",array("label"=>"Rue :"));
		$builder->add("city","text",array("label"=>"Ville :"));
		$builder->add("postalCode","integer",array("label"=>"Code postal :"));
		$builder->add("country","country",array(
				"label"=>"Pays :",
				"preferred_choices"=>array("FR")));
	}

	public function getName() {
		return "pat_userbundle_addresstype";
	}

	public function getDefaultOptions(array $options) {
		return array("data_class" => "PAT\UserBundle\Entity\Address");
	}
}
